import { fromJS } from 'immutable';
import * as constants from './constants';

const defaultState = fromJS({
    workData: []
});

export default (state = defaultState, action) => {
    switch(action.type) {
        case constants.CHANGE_DETAIL:
            return state.merge({
                workData: fromJS(action.workData)
            });
        default:
            return state;
    }
}